/*
 * CPrinter.h
 *
 *  Created on: Oct 29, 2013
 *      Author: m
 */

#ifndef CPRINTER_H_
#define CPRINTER_H_

#include <string>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cstdarg>
#include <sstream>
#include <unistd.h>

namespace ipc
{

class CPrinter
{
private:

    static std::string s_header;

    static void print( struct _IO_FILE *stream, const char *fmt, va_list arg_list );

    CPrinter();

public:
    virtual ~CPrinter();

    static void setHeader( const std::string &header );

    static void setHeader( const std::string &header, int identifier );
    static void printOut( const char *fmt, ... );

    static void printErr( const char *fmt, ... );

};

} /* namespace ipc */
#endif /* CPRINTER_H_ */
